package com.qishenyuan.competition.dto;

import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 发帖请求体
 */
@Data
public class CreateTopicReq {

    /**
     * 用户唯一标识
     */
    @NotNull(message = "uid can not be empty")
    private String uid;

    /**
     * 帖子的标题
     */
    @NotNull(message = "title can not be empty")
    private String title;

    /**
     * 帖子内容
     */
    @NotNull(message = "content can not be empty")
    @Size(max = 500, message = "content is too long")
    private String content;

    /**
     * 发帖的图片 objectNames
     */
    @NotNull(message = "imageUrls can not be empty")
    private List<String> imageUrls;

    /**
     * 发帖人联系方式
     */
    @NotNull(message = "contract can not be empty")
    private String contract;

    /**
     * 0:活动；1:竞赛
     */
    @NotNull(message = "tag can not be empty")
    private Integer tag;

    /**
     * 0:找人；1:找项目
     */
    @NotNull(message = "type can not be empty")
    private Integer type;

}
